package com.bingfabao.cecb;

import com.bingfabao.countDown.MyCountDown;

import java.util.concurrent.CyclicBarrier;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2021/2/25  13:40
 * 描述:
 */
public class CyclicerTest {

    public static void main(String[] args) {

        CyclicBarrier cyclicBarrier=new CyclicBarrier(5);

        for (int i=0;i<5;i++){
            Thread thread=new Thread(new MyCycRun(cyclicBarrier),"A-"+i);
            thread.start();
        }

        System.out.println("=++++++++++++++++");

        for (int i=0;i<5;i++){
            Thread thread=new Thread(new MyCycRun(cyclicBarrier),"B-"+i);
            thread.start();
        }


    }

}
